<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>使用组件的细节点</title>
    <script src="../vue.js"></script>
</head>
<body>
<div id="root">
    <table>
       <tbody>
            <tr is="row"></tr>
            <tr is="row"></tr>
            <tr is="row"></tr>

       </tbody>
    </table>


</div>

<script>
    // 非根组件定义data不能这么定义,data此时是个函数
    Vue.component("row",{
        data:function(){
            return {content:"this is content"}
        },
        template:"<tr><td>{{content}}</td></tr>"
    });

    var vm = new Vue({
        el:"#root"
    })
</script>

</body>
</html>